<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="edge">
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1.0,user-scalable=0">
    <meta content="telephone=no" name="format-detection" />
    <meta name="description" content="">
    <meta name="keywords" content="">
    <title>知识库-圈子列表</title>
    <link rel="stylesheet" type="text/css" href="css/reset.css">
    <link rel="stylesheet" type="text/css" href="css/global.css">
    <link rel="stylesheet" type="text/css" href="css/media.css">
    <link rel="stylesheet" type="text/css" href="css/loading.css">
    <script type="text/javascript" src="js/lib/loading.js"></script>
</head>

<body id="app">
    <!-- 头部 -->
    <header class="header">
        <back toback="true"></back>
        <div class="clearfix search-box">
            <input type="button" class="fl search-btn">
            <input type="text" id="searchword" class="search-txt" placeholder="搜索" value="" maxlength="30" v-model="searchkey">
        </div>
        <a href="javascript:void(0);" title="" class="icon addIcon" @click="add();"></a>
    </header>

    <!-- 圈子列表 -->
    <section class="padT23" v-show="!showModal" v-cloak>
        <!-- 加入 -->
        <div class="pad24 bgff addCircle">
            <div class="clearfix">
                <span class="fl db j_1 photo"><img data-src="{{cirDetail.pic}}" src="images/imgload.gif" alt="" class="loadImg"></span>
                <div class="fr text">
                    <h3 class="font26 color21 ell" v-cloak>{{cirDetail.title}}</h3>
                    <span class="db font24 color21 desc" v-cloak>{{{cirDetail.content}}}</span>
                    <a href="javascript:void(0);" class="addIn" v-if="cirDetail.isJoin === 0 " @click="joinCircle(1,cirDetail.id,$event);" v-cloak>加入</a>
                    <a href="javascript:void(0);" class="addIn hasJoined" v-if="cirDetail.isJoin === 1" @click="joinCircle(2,cirDetail.id,$event);" v-cloak>退出</a>
                </div>
            </div>
            <div class="clearfix marT24">
                <span class="fl nameIcon">{{cirDetail.author}}</span>
                <span class="fl numberIcon">{{cirDetail.personCount}}</span>
                <span class="fl view">{{cirDetail.readCount}}</span>
                <span class="fl comIcon">{{cirDetail.commentCount}}</span>
                <span class="fl timeIcon">{{cirDetail.date}}</span>
            </div>
        </div>
        <!-- tab -->
        <ul class="clearfix tabUl quesTab">
            <li v-bind:class="{'on':tabs==0}" @click="slides(0,$event)">全部</li>
            <li v-bind:class="{'on':tabs==1}" @click="slides(1,$event)">精华</li>
            <li v-bind:class="{'on':tabs==2}" @click="slides(2,$event)">最新</li>
        </ul>
        <div class="tabBox">
            <!-- 全部 -->
            <ul class="tabCont quesCont askCont">
                <li v-for="info in ansList | filterBy searchkey in 'title'" v-touch:swipe="swipeLeft($event)" v-touch-options:swipe="{ direction: 'horizontal' }">
                    <div>
                        <a href="javascript:;" @click="toDetail(info.id);" class="db">
                            <div class="clearfix padB24">
                                <img :src="info.headPic" class="fl borderRadius wh45">
                                <span class="db fl font20 color72 name">{{ info.author }}<em class="colorB">({{ info.level }})</em></span>
                                <span class="fr font20 line95 colorb6">{{ info.date }}</span>
                            </div>
                            <h3 class="font26 color22 titles">{{ info.title }}</h3>
                            <span class="db font24 color72 descText">{{{ info.content }}}</span>
                        </a>
                        <a href="javascript:void(0);" class="db font18 colorB tips"><em>企业管理</em><em>品牌管理</em></a>
                        <div class="clearfix">
                            <span class="fl imgIcon" v-if="info.contentPicture.Length > 0"></span>
                            <!-- 带精字图标的话题 -->
                            <span class="fl jIcon" v-if="info.isEssence == 1"></span>
                            <span class="fr comIcon">{{info.commentCount}}</span>
                            <span class="fr view">{{info.readCount}}</span>
                            <!-- 如果是已点赞的，则有class="on" -->
                            <span class="fr likeIcon">{{info.likeCount}}</span>
                        </div>
                    </div>
                    <div class="font26 dib shareColl two">
                        <a href="javascript:void(0);" @click="share({shareId:info.id,shareTit:info.title,sharePic:info.content},$event);" class="shareIcon"></a>
                        <a href="javascript:void(0);" @click="Collection({dataID:info.id},$event);" class="collIcon"></a>
                    </div>
                </li>
            </ul>
        </div>
    </section>

    <!-- 更多 -->
    <template v-if="addShow==true">
        <div class="cateBoxBg" @click="add();"></div>
        <ul class="cateBox">
            <li><a href="javascript:;" @click="send">发表</a></li>
        </ul>
    </template>

    <share :show.sync="showModal"></share>
    <!-- template for the modal component -->
    <script type="x/template" id="share-template">
        <!-- 头部 -->
        <header class="header" v-show="show">
            <a href="javascript:;" title="返回" class="icon back" @click="cancel();"></a>
            <div class="clearfix search-box searchBigBox">
                <input type="button" class="fl search-btn" @click="search();">
                <input type="text" id="searchword" class="search-txt" placeholder="搜索" value="" maxlength="30" v-model="query">
            </div>
            <a href="javascript:void(0);" title="确认" @click='ok();' class="text">确认</a>
        </header>

        <!-- 通讯录 -->
        <section class="padT23 addrBook" v-show="show">
            <div v-for="info in users">
                <span class="db pad24 font18 color72">{{info.type}}</span>
                <ul id='uluser' class="padLR24 bgff">
                    <!-- 选中则加上 class="on" -->
                    <li dataID='{{info.uid}}' class="padTB24 font24 color21 borderB" @click="checked($event);" v-for="info in info.userList | filterBy query in 'uname'">
                        {{info.uname }}
                    </li>
                </ul>
            </div>

        </section>
    </script>

    <script type="text/javascript" src="js/lib/jquery.min.js"></script>
    <script type="text/javascript" src="js/lib/vue.js"></script>
    <script type="text/javascript" src="js/lib/alert.js"></script>
    <script src="js/lib/hammer.min.js"></script>
    <script src="js/lib/vue-touch.js"></script>
    <script type="text/javascript" src="js/lib/global.js"></script>
    <script type="text/javascript" src="js/app.js"></script>
    <script type="text/javascript" src="js/lib/common.js"></script>
    <script type="text/javascript" src="js/circleList.js"></script>
    <script type="text/javascript">
        // 比例
        myJS.imgScale('.j_1', '1', '1');
        myJS.ImgFull('.loadImg');

        // tab
        $('.tabCont:eq(0)').show().siblings().hide();
        $('.tabUl li').bind('click', function() {
            var tab = $('.tabUl li').index(this);
            $('.tabCont').eq(tab).show().siblings().hide();
            $(this).addClass('on').siblings().removeClass('on');
        });
    </script>
</body>

</html>